package edu.nf.dao.impl;


import edu.nf.SQLExecutor;
import edu.nf.beans.annotations.Component;
import edu.nf.dao.UpdateEmpDao;
import edu.nf.entity.Emp;
import edu.nf.utils.SQLExecutorFactory;

@Component("UpdateEmpDao")
public class UpdateEmpDaoImpl implements UpdateEmpDao {


    @Override
    public void updateEmp(Emp emp) {
        String sql = "UPDATE EMP_INFO SET EMP_PASSWORD=?, EMP_NAME, EMP_SEX, EMP_PAY, EMP_DEPARTM, EMP_STATUS STU_STATUS=? WHERE EMP_ID=?";
        SQLExecutor se = SQLExecutorFactory.getSQLExecutor();
        se.executeUpdate(sql,  "001", emp.getEmpname(), emp.getSex(), emp.getDepartmId(), emp.getPay(), 1, emp.getEmpid());
    }
}
